require("../../utils/util.js");

var a = getApp();

Page({
    data: {
        toProgram: !1
    },
    onLoad: function(a) {
        var t = a.wid;
        this.toOtherProgram(t);
    },
    onShow: function() {
        this.data.toProgram && wx.switchTab({
            url: "/pages/index/index"
        });
    },
    onHide: function() {
        this.setData({
            toProgram: !0
        });
    },
    toOtherProgram: function(t) {
        var i = a.globalData.recommend;
        wx.navigateToMiniProgram ? wx.navigateToMiniProgram({
            appId: i.appid,
            path: "/pages/detail/detail?wid=" + t
        }) : wx.switchTab({
            url: "/pages/index/index"
        });
    }
});